/*
 * @Author: 张小平
 * @Date:   2025-05-01 
 * @Email:  qqshuqian@163.com 
 * @Copyright © 2024 aseyun. All rights reserved.
 */

import request from '@/framework-core/axios';
import website  from '@/framework-core/config/website';


/**
 * 获取token
 * @param data 获取token
 */
export async function getQiniuToken(cvtFlag) {
  return request({
    url: website.baseUrl+'/api/qiniu/getToken?cvtFlag='+(cvtFlag?1:0),
    method: 'get'
  })
}

/**
 * 上传回调
 * @param data 上传回调
 */
export async function qiniuCallBack(data) {
  return request({
    url: website.baseUrl + '/api/qiniu/callBack',
    method: 'post',
    data: data
  })
}

/**
 * 获取地址
 * @param url 地址
 */
export async function getUrl(url) {
  return request({
    url: website.baseUrl + '/api/sys/file/privateUrl?url='+url,
    method: 'get'
  })
}


export async function getQiniuTime(url) {
  return request({
    url:url,
    method: 'get'
  })
}

